<script>
export default {
  data() {
    // 生成后一天当前时间
    const now = new Date()
    const nextDay = new Date(now)
    nextDay.setDate(now.getDate() + 1)
    
    return {
      restoreTime: `${nextDay.getFullYear()}-${(nextDay.getMonth()+1).toString().padStart(2,'0')}-${nextDay.getDate().toString().padStart(2,'0')} ${nextDay.getHours().toString().padStart(2,'0')}:${nextDay.getMinutes().toString().padStart(2,'0')}`
    }
  }
}
</script>

<template>
  <div class="maintenance-page">
    <van-empty
      image="error"
      image-size="100"
      description=" "
      class="empty-container"
    >
      <!-- 修改模板部分 -->
      <h2 class="title">功能维护中</h2>
      <p class="subtitle">该功能正在系统升级维护</p>
      <p class="tips">预计恢复时间 {{ restoreTime }}</p>
      
      <van-button 
        round 
        type="primary" 
        class="back-btn"
        @click="$router.push('/')"
      >
        返回首页
      </van-button>
    </van-empty>
  </div>
</template>

<style scoped>
.maintenance-page {
  background: #f5f7fa;
}

.empty-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: transparent !important; 
  padding: 0;
  margin: 0;
}

.title, .subtitle, .tips {
  width: 100%;
  text-align: center;
}
</style>